package com.serviceImpl;

import com.dao.RoleDao;
import com.model.Role;
import com.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2017/8/31.
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Resource
    private RoleDao roleDao;

    @Override
    public List<Role> getRoleList(Role role) {
        return roleDao.getRoleList(role);
    }

    @Override
    public int createRole(Role role) {
        return roleDao.createRole(role);
    }

    @Override
    public int modifyRole(Role role) {
        return roleDao.modifyRole(role);
    }

    @Override
    public int changeStatus(Role role) {
        return roleDao.changeStatus(role);
    }

    @Override
    public int deleteRole(Role role) {
        return roleDao.deleteRole(role);
    }

    @Override
    public int checkExist(Role role) {
        return roleDao.checkExist(role);
    }

    @Override
    public String getRoleNameById(Role role) {
        return roleDao.getRoleNameById(role);
    }

    @Override
    public List<Role> getAllRoles() {
        return roleDao.getAllRoles();
    }
}
